/* eslint-disable prettier/prettier */
import * as React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import Login from './pages/account/login';
import CodeBoxDemo from './pages/account/CodeBoxDemo';
import UserInfo from './pages/account/userInfo';
const Stack = createNativeStackNavigator();

function Nav() {
  return (
    <NavigationContainer>
    {/* 
      *initialRouteName就是显示的路由组件
      *headerShown是取消标题
     */}
      <Stack.Navigator screenOptions={{headerShown:false}} initialRouteName="UserInfo">
      {/* 路由组件 */}
        <Stack.Screen name="Login" component={Login} />
        <Stack.Screen name="CodeBoxDemo" component={CodeBoxDemo} />
        <Stack.Screen name="UserInfo" component={UserInfo} />
      </Stack.Navigator>
    </NavigationContainer>
  );
}

export default Nav;
